diff options
| author | diogo464 <[email protected]> | 2025-08-12 16:46:31 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-12 16:46:31 +0100 |
| commit | 5c48d5cc58ce5d296d770c0e16cca13204b8200f (patch) | |
| tree | a1024f90f39140012a0c5b1582bef788fbb6bb54 /frontend/app/drive/[...path] | |
| parent | 4902a199b93fbdd9b265f9741c70e00eaf368939 (diff) | |
Fix URL encoding for paths with special characters
- Add URL decoding in upload endpoint for path parameter
- Add URL decoding for path segments in drive page navigation
- Ensures proper handling of directories/files with spaces and unicode chars
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'frontend/app/drive/[...path]')
| -rw-r--r-- | frontend/app/drive/[...path]/page.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/app/drive/[...path]/page.tsx b/frontend/app/drive/[...path]/page.tsx index b0c6d7d..8380a30 100644 --- a/frontend/app/drive/[...path]/page.tsx +++ b/frontend/app/drive/[...path]/page.tsx | |||
| @@ -7,7 +7,9 @@ export default async function DriveDirectoryPage({ | |||
| 7 | params: Promise<{ path: string[] }> | 7 | params: Promise<{ path: string[] }> |
| 8 | }) { | 8 | }) { |
| 9 | const { path: pathSegments } = await params | 9 | const { path: pathSegments } = await params |
| 10 | const currentPath = '/' + (pathSegments?.join('/') || '') | 10 | // URL decode each path segment to handle special characters |
| 11 | const decodedSegments = pathSegments?.map(segment => decodeURIComponent(segment)) || [] | ||
| 12 | const currentPath = '/' + decodedSegments.join('/') | ||
| 11 | 13 | ||
| 12 | const files = await Drive_ls(currentPath, false) | 14 | const files = await Drive_ls(currentPath, false) |
| 13 | return <DriveDirectoryView path={currentPath} files={files} /> | 15 | return <DriveDirectoryView path={currentPath} files={files} /> |
